package com.example.paymentsystem.service;

import com.example.paymentsystem.common.PaymentRequest;
import com.example.paymentsystem.common.PaymentResponse;
import com.example.paymentsystem.observer.PaymentEvent;
import com.example.paymentsystem.observer.PaymentEventPublisher;
import com.example.paymentsystem.template.AbstractPaymentTemplate;

/**
 * @author YiYuan
 * @data 2025/6/25
 * @apoNote
 */
public class PaymentService {

    private AbstractPaymentTemplate orderValidationPaymentTemplate;

    public PaymentResponse processPayment(PaymentRequest request) {
        System.out.println("Processing payment in service...");

        PaymentResponse response = orderValidationPaymentTemplate.processPayment(request);

        return response;
    }
}
